1. Field of the Invention
The present invention relates to a method and apparatus for avoiding starvation in a computer network.
2. Description of the Related Art
Generally, in a computer network, at least one target node which provides service and a plurality of initiator nodes which request service from the target node are connected to the network.
In such a computer network, a situation can occur where a service request sent from a particular initiator node is continually rejected at the target node and will not be accepted. This situation is known as starvation.
A variety of methods are practiced to avoid such starvation but, in any method, an area of a certain number of bits, as a field for carrying information for avoiding starvation, must be provided in a packet transferred between a target node and an initiator node. This results in an increase in communication traffic.
The present invention has been devised in view of the above problem, and an object of the invention is to provide a method and apparatus for avoiding starvation in a computer network, capable of minimizing the number of bits of the field that must be provided, within a packet, to avoid starvation.
To achieve the above object, according to the present invention, there is provided a method for avoiding starvation at an initiator node in a computer network to which are connected at least one target node which provides service and a plurality of initiator nodes which request service from the target node, the method comprising: an operation whereby, when a request is received from the initiator node during a period that the target node is unable to provide service, a reject reply is returned by attaching thereto reject time information that matches the period; an operation whereby, when the target node is in a state capable of providing service, a retry request carrying older reject time information is preferentially accepted; and an operation whereby, when the target node is in the state capable of providing service, a reject reply is returned by attaching thereto new reject time information in response to any first request received before retry requests arising from previously rejected requests are all accepted.
According to the present invention, there is also provided a method for avoiding starvation at an initiator node in a computer network to which are connected at least one target node which provides service and a plurality of initiator nodes which request service from the target node, the method comprising: (a) an operation whereby, when a first request is received at the target node when the target node is in a state capable of providing service, the first request is accepted; (b) an operation whereby, when a first request is received at the target node after the target node has moved to a state incapable of providing service, a reject reply is returned in response to the first request by attaching thereto reject time information consisting of at least one bit; (c) an operation whereby, when a retry request is received at the target node after the target node is restored to the state capable of providing service, the retry request is accepted depending on the reject time information attached to the retry request; and (d) an operation whereby, at the target node staying in the state capable of providing service, when a retry request is received, the retry request is processed in the same manner as in the operation (c), while when a first request is received, a reject reply is returned by attaching thereto reject time information.
According to the present invention, there is also provided a method for avoiding starvation at an initiator node in a computer network to which are connected at least one target node which provides service and a plurality of initiator nodes which request service from the target node, the method comprising: (a) an operation whereby, at the target node, a first parameter CE consisting of at least one bit, a second parameter SE consisting of the same number of bits as the number of bits of the first parameter, a third parameter CC consisting of the number of bits determined by the number of the plurality of initiator nodes, and a fourth parameter SC consisting of the same number of bits as the number of bits of the third parameter are all initialized to 0; (b) an operation whereby the initiator node sends a first request to the target node; (c) an operation whereby, when the first request is received at the target node, if CE=SE and SC=0 and if the target node is in a state capable of providing service, the first request is accepted; (d) an operation whereby, when the first request is received at the target node, if CE=SE and SC greater than 0 or if CE=SE and the target node is in a state incapable of providing service, then the CE is incremented, the CC is set to 1, and in response to the first request a reject reply is returned by attaching thereto the value of the CE; (e) an operation whereby, when the first request is received at the target node, if CExe2x89xa0SE, the CC is incremented and a reject reply is returned by attaching thereto the value of the CE; (f) an operation whereby the initiator node that received the reject reply sends a retry request to the target node by attaching thereto a fifth parameter RE whose value is equal to the value of the CE attached to the reject reply; (g) an operation whereby, when the retry request is received at the target node, if CE=SE and SC=0 and if the target node is in the state capable of providing service, the retry request is accepted; (h) an operation whereby, when the retry request is received at the target node, if RE=SE+1 and SC=0 and if the target node is in the state capable of providing service, then the SE is incremented, the SC is set to CC-1, and the retry request is accepted; (i) an operation whereby, when the retry request is received at the target node, if RE=SE and SC greater than 0 and if the target node is in the state capable of providing service, then the SC is decremented and the retry request is accepted; and (j) an operation whereby, when the retry request is received at the target node, if any of execution conditions in the operations (g), (i), and (j) is not satisfied, a reject reply is returned by attaching thereto the value of the RE in response to the retry request.
According to the present invention, there is also provided an apparatus for implementing each of the above methods. According to the present invention, there is also provided a recording medium readable by the apparatus and storing thereon a program for implementing each of the above methods.